<section class="container-fluid" ng-init="isPopupBox=false">
    
    <div class="fluis_header col-md-12">
           <table>
              <tr>
              	  <th>上课时间：</th>
              	  <td class="datepicker">
              	  	<input sf-date-picker id="startDate" class="input_style_01" type="text" ng-model="startDate" readonly>
              	  </td>
                  <th><span>—</span></th>
                  <td class="datepicker">
                  	<input sf-date-picker id="endDate" class="input_style_01" type="text" ng-model="endDate" readonly>
                  </td>
                  <td><a class="button" href="javascript:;" ng-click="setTimeRange('submonth');">最近15天</a></td>
                  <td><a class="button" href="javascript:;" ng-click="setTimeRange('month');">最近30天</a></td>
              	  <th>选择类型：</th>
              	  <td><select class="table_select" data-ng-options="classType.value as classType.name for classType in classTypes" data-ng-model="condition.classTypeValue">
                        <option value=""> --   所有类型   -- </option>
                      </select>
                  </td>
                  <th>选择教练：</th>
                  <td><select class="table_select" data-ng-options="coach.id as coach.name for coach in coachs" data-ng-model="condition.coachId">
                        <option value=""> --   所有教练   -- </option>
                      </select>
                  </td>
                  <td><button class="btn btn-lg btn-danger btn-block" ng-click="getReceipts(startDate, endDate)">查询</button></td>
              </tr>
           </table>
    </div>
    
	<div class="fluis_header statistics col-md-4">
		<h2>未结算</h2>
		{{paidBean.notPaid}}颗豆<br>
		<span>{{paidBean.notPaid*38|number:2}}元</span>
	</div>
	<div class="fluis_header statistics col-md-4">
		<h2>累计结算</h2>
		{{paidBean.paid}}颗豆<br>
		{{paidBean.paid*38|number:2}}元	
	</div>
	<div class="fluis_header statistics col-md-4">
		<h2>本月剩余体验豆</h2>
		{{paidBean.beansNow}}颗豆<br>
		&nbsp;
	</div>
    
    <div class="receipts_content col-md-12">
	    <div class="fluis_content col-md-12">
		   <table ng-table="tableParamsLessons" show-filter="false" class="table col-md-12">
		      <tr ng-repeat="lesson in $data">
				 <td>&nbsp;</td>
					<td data-title="'课程类型'">
						{{lesson.course.classType.name }}</td>
					<td data-title="'课程名称'">
						{{lesson.course.title }}</td>
					<td data-title="'上课时间'">
						{{lesson.beginTime}}</td>         		    		
					<td data-title="'上课教练'">
						{{lesson.coach.name}}</td>   
					<td data-title="'课程单价 '">
						{{lesson.course.price}}颗豆</td>        		
					<td data-title="'报名人数'">
						{{lesson.numberBooked}}人</td>
					<td data-title="'课程总价'">
						{{(lesson.course.price * lesson.numberBooked)|number:2}}颗豆</td>
					<td data-title="'使用体验豆'">
						{{lesson.paidInCoupon}}颗豆</td>
					<td data-title="'课程收入'">
						{{lesson.paidInBean}}颗豆
					</td>          		
					<td data-title="'结算状态'">
						<font ng-class="lesson.status==2?'green':'red'">{{lesson.status==2?'已结算':'未结算'}}</font></td>  
					<td data-title="'操作'">
						<font><a href="javascript:;" ng-click="orderDetailByLesson(lesson);">查看详情</a></font></td>  
		      </tr>
		    </table>
	    </div>
    </div>
	
    <div id="popupBox" ng-show="isPopupBox" class="receiptsBox fluis_content">
        <a ng-click="closePopupBox()" class="shut"></a>
    	<div class="receipts_header">
	    	课程名字：<span>{{selectedLesson.course.title}}</span><br>
	    	上课时间：<span>{{selectedLesson.beginTime}}</span><br>
	    	代课教练：<span>{{selectedLesson.coach.name}}</span><br>
	    	上课人数：<span>{{selectedLesson.numberBooked}}人</span><br>
	    	课程单价：<span class="douz">X {{selectedLesson.course.price}}</span><br>
                      课程总收入：<span class="douz">X {{selectedLesson.paidInBean}}</span>
    	</div>
    	<div class="receipts_content">
	    	<table ng-table="tableParamsReceipt" show-filter="false" class="table col-md-12">
		      <tr ng-repeat="receipt in $data">
		      	<td>&nbsp;</td>
				<td data-title="'订单号'">
					{{receipt.id}}</td>
				<td data-title="'用户'">
					{{receipt.member.name}}</td>
				<td data-title="'手机号'">
					{{receipt.member.mobile}}</td>
				<td data-title="'人数'">
					{{receipt.number}}</td>
				<td data-title="'消费'">
					{{receipt.paidInBean}}</td>
				<td data-title="'体验豆'">
					{{receipt.paidInCoupon}}</td>
				<td data-title="'订单总价'">
					{{(receipt.paidInBean + receipt.paidInCoupon)|number:2}}颗</td>
		      </tr>
	    	</table>
    	</div>
    </div>
</section>